package com.scaffold.controller;


import com.scaffold.param.HelloParam;
import com.scaffold.service.HelloFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {


    @Autowired
    private HelloFeignClient helloFeignClient;

    @RequestMapping(value = "/sayHi")
    public String sayHiFeign() {
        return helloFeignClient.sayHi();
    }

    @RequestMapping(value = "/sayHello")
    public String sayHelloFeign() {
        HelloParam hello = new HelloParam(1,"hello");
        return helloFeignClient.sayHello(hello);
    }

    @RequestMapping(value = "/sayHelloTwo")
    public String sayHelloFeignTwo() {
        return helloFeignClient.sayHelloTwo(1,"hello");
    }

}

